<%@ tag pageEncoding="UTF-8" %>
<%@ include file="inc/taglibs.jsp" %>
<%@ tag import="com.pearlsoft.util.StringUtils" %>

<%-- 高级查询 window --%>
<%@ attribute rtexprvalue="true" required="false" name="var"%>
<%@ attribute rtexprvalue="true" required="true" name="id"%>
<%@ attribute rtexprvalue="true" required="false" name="renderTo"%>
<%@ attribute rtexprvalue="true" required="false" name="width" %>
<%@ attribute rtexprvalue="true" required="false" name="height" %>
<%@ attribute rtexprvalue="true" required="false" name="title" %>
<%@ attribute rtexprvalue="true" required="false" name="layout" %>
<%@ attribute rtexprvalue="true" required="true" name="searchHandler" description="点击查询按钮后的执行  handler(conditions)" %>
<%@ attribute rtexprvalue="true" required="true" name="searchHandlerscope"  description="执行handler的scope"%>
<%@ attribute rtexprvalue="true" required="true" name="searchFormId" description="高级查询窗口中的查询表单Id" %>

<plsc:component name="Ext.window.Window" var="${var}">
	<jsp:doBody/>
	<plsc:attr name="id" test="${!empty(id)}">${id}</plsc:attr>
	<plsc:attr name="renderTo" test='<%=StringUtils.isNotEmpty(renderTo)%>'
		type='<%= StringUtils.getRenderType(renderTo)%>'>${renderTo}</plsc:attr>
	<plsc:attr name="width" test="${!empty(width)}"  type="int" >${width}</plsc:attr>
	<plsc:attr name="height" test="${!empty(height)}"  type="int" >${height}</plsc:attr>	
	<plsc:attr name="title" >${empty(title)? "高级查询":title }</plsc:attr>
	<plsc:attr name="searchHandler" type="direct" >${searchHandler}</plsc:attr>
	<plsc:attr name="searchHandlerscope" type="direct" test="${!empty(searchHandlerscope)}" >${searchHandlerscope}</plsc:attr>
	<plsc:attr name="searchFormId" >${searchFormId}</plsc:attr>
	<plsc:attr name="layout" type="string">${empty(layout)? "fit":layout }</plsc:attr>
	<plsc:attr name="closeAction">hide</plsc:attr>
	<plsc:items>
		<plsc:value type="direct" >Ext.getCmp('${searchFormId}')</plsc:value>
	</plsc:items>
	<plsc:attr name="bbar">
		<plsc:items>
			<plsc:value >-></plsc:value>
			<plsc:value >-</plsc:value>
			<plsc:value>
				<plsc:attr name="iconCls" type="string">icon_reset</plsc:attr>
				<plsc:attr name="text">重置</plsc:attr>
				<plsc:handler name="handler" funcName="Pearlsen.TAG.advSearchWindow.resetForm" scope="Ext.getCmp('${id}')"/>
			</plsc:value>
			<plsc:value >-</plsc:value>
			<plsc:value>
				<plsc:attr name="iconCls" type="string">icon-search</plsc:attr>
				<plsc:attr name="text">查询</plsc:attr>
				<plsc:handler name="handler" funcName="Pearlsen.TAG.advSearchWindow.search" scope="Ext.getCmp('${id}')"/>
			</plsc:value>
			<plsc:value >-</plsc:value>
		</plsc:items>
	</plsc:attr>
</plsc:component>

